<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../script/bootstrap-3.3.7.min.css">
    <script src="../script/jquery-1.10.min.js"></script>
    <script>
        var person={
                firstname : "John",
                lastname  : "Doe",
                id        :  5566,
                fullname : function () {
                    return this.firstname + " " + this.lastname
                }
                };
        function display() {
                person.fullname1= function () {
                    return "fullname1"
                }
                alert(person.fullname() + " "+ person.fullname1())

        }

    </script>
</head>
<body>
<div class="container">
    <div class="row">
    <div class="col-md-12">
        <p style="color: red;font-size: 1.5em;"></p>
    </div>
</div>
    <div class="row">
        <div>
            <textarea id = "text1" rows="12" cols="50"></textarea>
            <script>
                str='var person={\n' +
                    ' firstname : "John",\n' +
                    ' lastname  : "Doe",\n' +
                    '  id        :  5566\n' +
                    '  fullname : function () {\n' +
                    '      return this.firstname + " " + this.lastname\n' +
                    '   }\n' +
                    ' };\n' +
                    'function display1() {\n' +
                    '       alert(person.fullname)\n' +
                    ' \n' +
                    '}'
                document.getElementById("text1").value=str
            </script>
        </div>
    </div>
    <div class="row">
    <div class="col-md-6 col-md-offset-2">
        <div><button onclick="display()" class="btn btn-danger">执行</button></div>
    </div>
    </div>

    <p class="page-header"></p>


</div>
<script>


</script>
</body>
</html>